export const MENU_PATTERN = [
  {index: 1, eventType:"anchor", value:'anchor', compType:'DropdownNormal', name: '页面跳转', placeholder:"页面-1", label:"页面id"},
  {index: 2, eventType:"layer", value:'layer', compType:'DropdownNormal', name: '弹层页面', placeholder:"弹层-1", label:"弹层id"},
  {index: 3, eventType:"anchorInPage", value:'anchorInPage', compType:'InputNormal', name: '页面内锚点跳转', placeholder:"锚点id", label:"锚点id"},
  {index: 4, eventType:"compVisibleInComps", value:'compVisibleInComps', compType:'InputNormal', name: '组件显示', placeholder:"组件id", label:"组件id"},
  {index: 0, eventType:"link", value:'link', compType:'InputNormal', name: '网页链接', placeholder:"https://www.xxx.com", label:"网址地址"},
]
export const ROTATE3D_LIST = [{url:''}]
//这个字段是将图片组件中的雪碧图参数转换为雪碧图对象后赋值到这个对象上的 interactionData.spriteSheetObj = {}, url:"",selectedUrl:"",text:"",params:""
export const INTERACTION_DATA = { isDimension: false, lists: [{url:""}], dimensionLists: [[{url:""}]]}
export const STATISTIC_DATA_TYPES = [
  { name: "牧场计划", value: "get_year_report_pasture_plan" },
  { name: "数据包", value: "get_hfive_data_excavate_packing" },
  { name: "加密条形码", value: "aes" },
  { name: "用户参与PK", value: "pk" },
  { name: "小米10周年注册天数", value: "get_user_register_days" },
  { name: "小米10周年互动", value: "get_xiaomi_interact" },
  // { name: "华为关注余承东", value: "get_weibodata_huawei_activity_uid_fanslist" },
  { name: "微博2020年度数据", value: "get_weibo_year_summary" },

  { name: "微博2021年度抽奖数据", value: "get_weibo_year_lottery" },
  { name: "微博时光轴", value: "get_weibo_timeline_2021" },
]
// 999抗疫日记   get_hfive_data_excavate_packing
// 微博平台uid年度汇总数据接口  get_year_report_pasture_plan
// 小米全量uid     get_user_register_days
// 小米关注雷军粉丝包   get_xiaomi_interact
export const STATISTIC_DATA_TYPES_MAP = {
  reportPasturePlan: "get_year_report_pasture_plan",
  dataBag: "get_hfive_data_excavate_packing",
  aes: "aes",
  pk: "pk",
  xiaomi10Days: "get_user_register_days",
  xiaomi10Interact: "get_xiaomi_interact",
  // huawei: "get_weibodata_huawei_activity_uid_fanslist",
  weibo2020: "get_weibo_year_summary",
  weibo2021vote: "get_weibo_year_lottery",
  weiboTime: "get_weibo_timeline_2021"
}
export const SAVE_IMG_DATA_TYPES = [
  { name: "jpeg", value: "jpeg" },
  { name: "png", value: "png" },
]
export const FRONT_EVENT_TYPES = [
  { name: "切换幻灯片", value: 1 },
  { name: "截图中添加贴纸", value: 2 },
  { name: "随机页面或滑动翻页", value: 3 },
  { name: "微博微信区别显示", value: 4 },
  { name: "视频禁音", value: 5 },
  { name: "视频播放声音", value: 9 },
  { name: "播放视频", value: 6 },
  { name: "切换视频", value: 21 },
  { name: "改变关联组件数据", value: 7 },
  { name: "打开相册", value: 8 },
  { name: "旋转相册图片", value: 22 },
  { name: "移除打开相册图片", value: 15 },
  { name: "老虎机", value: 10 },
  { name: "文本输入添加截图隐藏组件id", value: 11 },
  { name: "删除雪碧图文字", value: 12 },
  { name: "确认雪碧图文字", value: 13 },
  { name: "播放雪碧图动画", value: 14 },
  { name: "幻灯片上一页", value: 16 },
  { name: "幻灯片下一页", value: 17 },
  { name: "播放音乐", value: 18 },
  { name: "暂停音乐", value: 19 },
  { name: "抓娃娃机", value: 20 },
  { name: "复制文本", value: 23 },
  { name: "随机文本", value: 24 },
  { name: "导出SVG", value: 25 },
  { name: "扭蛋机", value: 26 },
  { name: "传递数据", value: 27 },
  { name: "翻动下一页", value: 28 },
  { name: "开始倒计时", value: 29 },
  { name: "清除paper画布", value: 30 },
  { name: "切换音频", value: 31 },
  { name: "切换滚动容器", value: 32},
]
export const FRONT_EVENT_TYPE_MAPS = {
  "swiper": 1,
  "urlToCanvas": 2,
  "randomOpenPage": 3,
  "weiboWeixin": 4,
  "videoMute": 5,
  "playVideo": 6,
  "switchVideo": 21,
  "changeRelateCompData": 7,
  "openCamera": 8,
  "videoPlayAudio": 9,
  "slotMachine": 10,
  "textChangeAddHiddenId": 11,
  "removeSpriteSheetText": 12,
  "confirmSpriteSheetText": 13,
  "playSpriteSheetAnim": 14,
  "removeCamera": 15,
  "swiperPre": 16,
  "swiperNext": 17,
  "playAudio": 18,
  "pauseAudio": 19,
  "graspDoll": 20,
  "rotateCameraImg": 22,
  "copyText": 23,
  "randomText": 24,
  "exportSVG": 25,
  "twistedEgg": 26,
  "passData": 27,
  "turnBook": 28,
  "startTimer": 29,
  "clearPaper": 30,
  "switchAudio": 31,
  "switchScroll":32
}
//幻灯片数据
// let swiperData = {
//   "relateCompId":"58d5e65d-dc39-4325-8a03-5d286e9c9bf2",
//   "swipers":[["https://static.hd.xxx.com/upload/biz/26/939150.jpg","https://static.hd.xxx.com/upload/biz/26/518394.jpg"],["https://static.hd.xxx.com/upload/biz/26/815783.jpg","https://static.hd.xxx.com/upload/biz/26/524219.jpg"]]
// }
//随机打开页面数据格式
//{"randomArr":[2,3,4,5,6],"notSameArr":[4,6],"randomCount":3}
//showOrHide layer link dial anchor email share
export const EVENT_TYPES = {
  control:[
    {type: "showOrHide", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"TextareaNormal", lable:"响应行为", attrs:{value:''}}
    ]},
    {type: "layer", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"DropdownNormal", lable:"触发弹层", attrs:{value:1}},
      {name:"TextareaNormal", lable:"组件ids用,分隔", attrs:{value:""}},
      {name:"TextareaNormal", lable:"随机弹层", attrs:{value:''}},
      {name:"TextareaNormal", lable:"关联弹层", attrs:{value:''}},
    ]},
    {type: "layerClose", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"关闭弹层", attrs:{value:""}}
    ]},
    {type: "rotate3d", index: 0, eventComType:"add-event-rotate3d", mouseBehavior: "click", isHover:false, comps:[
      // {name:"DropdownNormal", lable:"触发弹层", attrs:{value:0}},
      // {name:"DropdownNormal", lable:"触发页面", attrs:{value:0}},
      // {name:"InputNormal", lable:"跳转外链", attrs:{value:""}},
      {name:"InputNormal", lable:"提供数据给关联id", attrs:{value:""}},
      {name:"SwitchNormal", lable:"播放动画", attrs:{value:true}},
      {name:"SwitchNormal", lable:"获取组件提供数据", attrs:{value:false}},
      {name:"TextareaNormal", lable:"自定义数据", attrs:{value:''}}
    ]},
    {type: "interactionData", index: 0, eventComType:"add-event-interactionData", mouseBehavior: "data", isHover:false, comps:[
      {name:"TextareaNormal", lable:"自定义数据", attrs:{value:''}},
      {name:"InputNormal", lable:"关联组件id", attrs:{value:''}}
    ]},
    {type: "compareInComps", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"TextareaNormal", lable:"组件参数", attrs:{value:''}}
    ]},
    {type: "frontEvents", index: 0, eventComType:"add-event-front-events", mouseBehavior: "click", isHover:false, comps:[
      {name:"DropdownNormal", lable:"事件类型", attrs:{value:'', isBreak: false, isCommonFrontEvents: false}},
      {name:"TextareaNormal", lable:"事件参数", attrs:{value:'', relateCompId:'', rules:'', imgs:'', weiboCompId:'', weixinCompId:''}},
    ]},
    {type: "saveImg", index: 0, eventComType:"add-event-save-img", mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"发博组件id", attrs:{value:""}},
      {name:"InputNormal", lable:"截图容器id", attrs:{value:"", hiddenCompIds:''}},
      {name:"InputNormal", lable:"替换图片组件id", attrs:{value:"", isUploadImgToServer:true,}},
      {name:"DropdownNormal", lable:"截图类型", attrs:{value:"jpeg", quality:0.8}},
    ]},
    {type: "openPush", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"DropdownNormal", lable:"发博类型", attrs:{value:0}},
      {name:"TextareaNormal", lable:"发博框预设内容", attrs:{value:""}},
      {name:"InputNormal", lable:"发博关联id", attrs:{value:""}},
    ]},
    {type: "shake", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"触发关联事件", attrs:{value:''}}, 
      {name:"DropdownNormal", lable:"触发弹层", attrs:{value:0}},
      {name:"DropdownNormal", lable:"触发页面", attrs:{value:0}},
      {name:"InputNormal", lable:"跳转外链", attrs:{value:""}}
    ]},
    {type: "scanQRCode", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"扫一扫参数", attrs:{value:""}}
    ]},
    {type: "animate", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"动画参数", attrs:{value:""}}
    ]},
    {type: "checkWeibo", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"DropdownNormal", lable:"触发弹层", attrs:{value:""}},
      {name:"InputNormal", lable:"需要登录微博", attrs:{value:""}},
      {name:"DropdownNormal", lable:"触发页面", attrs:{value:""}},
    ]},
    
  ],
  link: [
    {type: "link", index: 0, eventComType:"add-event-link", mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"网页链接", attrs:{value:""}},
      {name:"InputNormal", lable:"微博跳转", attrs:{value:""}},
      {name:"InputNormal", lable:"跳转key", attrs:{value:""}},
      {name:"SwitchNormal", lable:"自动跳转", attrs:{value:false,delayTime:0}}
    ]},
    {type: "dial", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"拨打电话", attrs:{value:"15910586266"}}
    ]},
    {type: "anchor", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"DropdownNormal", lable:"页面跳转", attrs:{value:""}},
      {name:"InputNormal", lable:"随机页面", attrs:{value:''}},
      {name:"TextareaNormal", lable:"关联页面", attrs:{value:''}},
    ]},
    {type: "email", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"邮箱", attrs:{value:"xxx@sina.com"}}
    ]},
    {type: "share", index: 0, mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"分享参数", attrs:{value:"share"}}
    ]},
  ],
  wb: [
    {type: "submit", index: 0, eventComType:"add-event-submit", mouseBehavior: "click", controlId: 'submit', isHover:false, comps:[
      {name:"InputNormal", lable:"提示参数", attrs:{value:""}},
      {name:"InputNormal", lable:"多选关联id", attrs:{value:""}},
      {name:"TextareaNormal", lable:"自定义参数（如表单打组组件id）", attrs:{value:""}}
    ]},
    {type: "smsVerification", index: 0, mouseBehavior: "click", controlId: 'smsVerification', isHover:false, comps:[{name:"InputNormal", lable:"验证关联id", attrs:{value:""}}]},
    {type: "vote", index: 0, isInitComp: true, eventComType:"add-event-vote", controlId: '1001', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "number", index: 0, isInitComp: true, eventComType:"add-event-number", controlId: '1002', mouseBehavior: "click", isHover:false, comps:[
      {name:"InputNormal", lable:"提示参数", attrs:{value:""}},
      // {name:"DropdownNormal", lable:"没有机会触发弹层", attrs:{value:0}},
      // {name:"InputNormal", lable:"前端触发参数", attrs:{value:""}},
    ]},
    {type: "push", index: 0, eventComType:"add-event-push", controlId: '1004', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "repost", index: 0, eventComType:"add-event-repost", controlId: '1003', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "praise", index: 0, eventComType:"add-event-praise", controlId: '1006', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "follow", index: 0, eventComType:"add-event-follow", controlId: '1007', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "isFollow", index: 0, isInitComp: true, eventComType:"", controlId: 'isFollow', isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}},{name:"InputNormal", lable:"关注uid", attrs:{value:""}}]},

    {type: "reposts", index: 0, isInitComp: true, comType:"add-reposts", controlId: '1010', isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "user", index: 0, eventComType:"add-event-user", controlId: '1013', isInitComp: true, isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "rankFriend", index: 0, eventComType:"add-event-rank-friend", isInitComp: true, controlId: '1011', isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "generalNum", index: 0, eventComType:"add-event-general-num", isInitComp: true, controlId: '1016', isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "judgeRightWrong", index: 0, eventComType:"add-event-judge-right-wrong", isInitComp: true, controlId: '1012', isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},

    {type: "activityInfo", index: 0, eventComType:"add-event-activity-info", controlId: '1014', mouseBehavior: "load", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},

    {type: "general", index: 0, eventComType:"add-event-general", controlId: '1015', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},

    {type: "lottery", index: 0, eventComType:"add-event-lottery", controlId: '1009', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "packet", index: 0, eventComType:"add-event-packet", controlId: '1008', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
    {type: "msg", index: 0, eventComType:"add-event-msg", controlId: '1005', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},

    {type: "statisticData", index: 0, controlId: '1017', isInitComp: true, isHover:false, 
      comps:[
        {name:"DropdownNormal", lable:"统计参数类型", attrs:{value:""}},
        {name:"TextareaNormal", lable:"显示隐藏组件", attrs:{value:""}},
        {name:"TextareaNormal", lable:"组件数据", attrs:{value:""}},
      ]},
    {type: "numberDayExists", index: 0, eventComType:"add-event-number-day-exists", controlId: '1018', isInitComp: true, isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},

    // {type: "site", index: 0, eventComType:"add-event-site", controlId: 'site', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"站点数据", attrs:{value:""}}]},
    // {type: "customUser", index: 0, eventComType:"add-event-customUser", controlId: 'customUser', mouseBehavior: "click", isHover:false, comps:[{name:"InputNormal", lable:"自定义用户", attrs:{value:""}}]},
  ],
  wb_: [
    {type: "timer", index: 0, eventComType: "add-event-timer", controlId: 'timer', mouseBehavior: "load", isHover:false, comps:[{name:"InputNormal", lable:"提示参数", attrs:{value:""}}]},
  ]
}
export const EVENT_HOVER_TYPES = {
  // 'pop-repost': {label: "触发事件", isHover:false, classStrHover:'btn-event-event-hover event-sprite-hover', classStr:'btn-event-event event-sprite', },
  /** 控件类 **/
  showOrHide: {type: 'showOrHide', label: "组件可见", classStrHover:'btn-event-event-hover event-sprite-hover', classStr:'btn-event-event event-sprite', },
  layer: {type: 'layer', label: "触发弹层", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  layerClose: {type: 'layerClose', label: "关闭弹层", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  saveImg: {type: 'saveImg', label: "截图后保存", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  openPush: {type: 'openPush', label: "呼起发博框", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  rotate3d: {type: 'rotate3d', label: "3d旋转", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  interactionData: {type: 'interactionData', label: "自定义数据", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  compareInComps: {type: 'compareInComps', label: "组件间数据", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  frontEvents: {type: 'frontEvents', label: "前端触发", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  shake: {type: 'shake', label: "摇一摇", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  scanQRCode: {type: 'scanQRCode', label: "扫一扫", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  animate: {type: 'animate', label: "动画", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  checkWeibo: {type: 'checkWeibo', label: "非微博提示", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },

  /** 链接类 **/
  link: {type: 'link', label: "网页链接", classStrHover:'btn-event-link-hover event-sprite-hover', classStr:'btn-event-link event-sprite', },
  dial: {type: 'dial', label: "拨打电话", classStrHover:'btn-event-dial-hover event-sprite-hover', classStr:'btn-event-dial event-sprite', },
  anchor: {type: 'anchor', label: "页面跳转", classStrHover:'btn-event-anchor-hover event-sprite-hover', classStr:'btn-event-anchor event-sprite', },
  email: {type: 'email', label: "邮件", classStrHover:'btn-event-email-hover event-sprite-hover', classStr:'btn-event-email event-sprite', },
  share: {type: 'share', label: "分享", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },

  /** 微博事件 **/
  submit: {type: 'submit', label: "表单提交", classStrHover:'btn-event-link-hover event-sprite-hover', classStr:'btn-event-link event-sprite', },
  smsVerification: {type: 'smsVerification', label: "短信验证", classStrHover:'btn-event-layer-hover event-sprite-hover', classStr:'btn-event-layer event-sprite', },
  vote: {type: 'vote', label: "投票", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  number: {type: 'number', label: "计数", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  push: {type: 'push', label: "发博", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  repost: {type: 'repost', label: "转发", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  praise: {type: 'praise', label: "赞", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  follow: {type: 'follow', label: "关注", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  isFollow: {type: 'isFollow', label: "是否关注", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  reposts: {type: 'reposts', label: '博文组', classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  user: {type: 'user', label: "微博用户", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  rankFriend: {type: 'rankFriend', label: "好友列表", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  generalNum: {type: 'generalNum', label: "通用计数", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  judgeRightWrong: {type: 'judgeRightWrong', label: "获取通用", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  activityInfo: {type: 'activityInfo', label: "活动信息", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  general: {type: 'general', label: "触发通用", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  lottery: {type: 'lottery', label: "抽奖", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  packet: {type: 'packet', label: "红包", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  msg: {type: 'msg', label: "私信", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  statisticData: {type: 'statisticData', label: "统计数据", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  numberDayExists: {type: 'numberDayExists', label: "每天计数", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  getData: {type: 'getData', label: "获取数据", classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },

  /** 其他 **/
  anchorInPage: {type: 'anchorInPage', label: "页面内锚点跳转", classStrHover:'btn-event-link-hover event-sprite-hover', classStr:'btn-event-link event-sprite', },
  timer: {type: 'timer', label: '倒计时', classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  site: {type: 'site', label: '站点数据', classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
  customUser: {type: 'customUser', label: '自定用户', classStrHover:'btn-event-share-hover event-sprite-hover', classStr:'btn-event-share event-sprite', },
}
export const FRONT_EVENTS = [
  EVENT_HOVER_TYPES.compareInComps.type,
  EVENT_HOVER_TYPES.rotate3d.type,
  EVENT_HOVER_TYPES.saveImg.type,
  EVENT_HOVER_TYPES.shake.type,
  EVENT_HOVER_TYPES.animate.type,
  EVENT_HOVER_TYPES.checkWeibo.type,
]
export const EVENT_ATTR = {
  '1000': {controlId: '1000', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"微博列表设置"},
  '1001': {controlId: '1001', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''},
            title: "投票UI设置",
          },
  '1002': {controlId: '1002', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:'', icon: "jy-icon-love", number: 0},
            title: "计数参数设置"
          },
  '1003': {controlId: '1003', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"转发博文设置"},
  '1004': {controlId: '1004', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"原发博文设置"},
  '1005': {controlId: '1005', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"私信参数设置"},
  '1006': {controlId: '1006', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"点赞设置"},
  '1007': {controlId: '1007', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"关注参数设置"},
  '1008': {controlId: '1008', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"红包参数设置"},
  '1009': {controlId: '1009', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"抽奖参数设置"},
  '1010': {controlId: '1010', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"博文组"},
  '1011': {controlId: '1011', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"好友排行榜"},
  '1012': {controlId: '1012', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"判断对错"},
  '1013': {controlId: '1013', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"用户信息"},
  '1014': {controlId: '1014', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"活动信息"},
  '1015': {controlId: '1015', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"通用接口"},
  '1016': {controlId: '1016', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"通用接口计数"},
  '1017': {controlId: '1017', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"牧场数据"},
  '1018': {controlId: '1018', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"每天是否计数"},


  // 'pop': {controlId: 'pop', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"弹层数据"},
  'link': {controlId: 'link', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"每天是否计数"},
  'submit': {controlId: 'submit', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"表单提交"},
  'smsVerification': {controlId: 'smsVerification', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"表单提交"},
  'timer': {controlId: 'timer', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''}, title:"倒计时"},
  'site': {controlId: 'site', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''},title:"站点信息"},
  'customUser': {controlId: 'customUser', wbAttr: {resultType: 1, successPanelId: -1, successCompId: '', failPanelId: -1, failCompId: '', link:'', eventType:''},title:"自定义用户信息"},
}

export function getMenuItemByEventType(eventType){
  let item
  for(let i = 0; i < MENU_PATTERN.length; i++){
    item = MENU_PATTERN[i];
    if(item.eventType == eventType){
      return item;
    }
  }
  return item;
}
export function getEventByControlId({controlId, type}){
  let events = _.concat(EVENT_TYPES.wb, EVENT_TYPES.wb_);
  let event;
  for(let i = 0, len = events.length; i < len; i++){
    event = events[i];
    if(event.controlId == controlId && event.type == type){
      return event;
    }
  }
  return event;
}
export function isWbEvent({controlId, type}){
  let events = _.concat(EVENT_TYPES.wb, EVENT_TYPES.wb_);
  let event;
  for(let i = 0, len = events.length; i < len; i++){
    let event_ = events[i];
    if(event_.controlId == controlId && event_.type == type){
      event =  event_;
    }
  }
  return event ? true : false;
}


let allEvents = null
export function getEventsMap(){
  if(allEvents){
    return allEvents
  }else{
    allEvents = {}
    _.forEach(EVENT_TYPES, (events) =>{
      _.forEach(events, (event) => {
        allEvents[event.type] = event
      })
    })
    return allEvents
  }
}

let pageEvents = null
export function getPageEvents(){
  if(pageEvents){
    return pageEvents
  }else{
    pageEvents = {}
    _.forEach(EVENT_TYPES, (events) => {
      _.forEach(events, (event) => {
        if(event.isInitComp){
          if(event.type == EVENT_HOVER_TYPES.reposts.type){
            event.eventComType = "add-event-reposts"
          }
          pageEvents[event.type] = event
        }
        if(event.type == EVENT_HOVER_TYPES.link.type || event.type == EVENT_HOVER_TYPES.frontEvents.type){
          pageEvents[event.type] = event
        }
      })
    })
    return pageEvents
  }
}
